package eu.ydp.mathplayer.editor.view;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Panel;

import eu.ydp.mathplayer.editor.controller.ActionSocket;

public class EditorView extends Composite {

	private FlowPanel container;
	
	private MenuView menu;
	private SandboxView sandbox;
	
	public EditorView(){
		menu = new MenuView();
		sandbox = new SandboxView();

		container = new FlowPanel();
		container.setStyleName("math-editor-container");
		
		container.add(menu);
		container.add(sandbox);
		
		initWidget(container);
	}
	
	public void init(ActionSocket actionSocket){
		menu.init(actionSocket);
		sandbox.init(actionSocket);
	}
	
	public Panel getSandboxOwner(){
		return sandbox.getSandboxOwner();
	}
	
}
